#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "listfile.h"

#include <QMessageBox>
#include <QFileDialog>
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    QString dir = QFileDialog::getExistingDirectory(this, "选择你的文件夹", ".");
    if(dir.isEmpty())
    {
        qDebug() << "没有选择目录";
        return;
    }
    listfile *listwidget = new listfile(dir, this);


    listwidget->show();

}

